<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false"%>																		
<%@ include file="/WEB-INF/view/jsp/base.jsp" %>                                                                                                                                       
<html lang="en">                                                                                                                                                                       
<body class="wysihtml5-supported">                                                                                                                                                     
	<div id="content">
	<#list indexs as ind>                                                                                                                                                                    
		<div class="container-fluid" >                                                                                                                                                      
			<div class="row-fluid">                                                                                                                                                           
				<div class="span12">                                                                                                                                                             
					<div class="widget-box">                                                                                                                                                      
						<div class="widget-title">                                                                                                                                                  
							<h5>查询${tableName}</h5>                                                                                                                                                               
						</div>                                                                                                                                                                        
						<div class="widget-content nopadding">                                                                                                                                      
						<#if ind.unique=true>
							<form id="query_form_${ind_index}" action="<%=path %>/${lowerClassName}/detail" method="post" onsubmit="return C.toVail(${r'$'}(this))" class="form-horizontal">                                   
						<#else>
							<form id="query_form_${ind_index}" action="<%=path %>/${lowerClassName}/list" method="post" onsubmit="return C.toVail(${r'$'}(this))" class="form-horizontal">                                   						
						</#if>
						<#list ind.fieldNames as fieldname >
								<div class="flexbox">
									<div class="flex-item">                                                                                                                                             
										<label>
										<#list columns as c><#if c.fieldName=fieldname>${c.columnComments}:</label>                                                                                                                         
										<input type="text" class="" name="${fieldname}" placeholder="" maxlength="${c.columnLength}">
										</#if></#list>                                                                                         
										<span class="error_msg" name="error_${fieldname}"></span>                                                                                                               
									</div>                                                                                                                                                                  
								</div>
						</#list>		                                                                                                                                                                    
								<div class="form-actions">                                                                                                                                              
									<button type="button" class="btn btn-success" style="float:right" onclick="query('query_form_${ind_index}')">查询</button>                                                                                   
								</div>                                                                                                                                                                    
							</form>                                                                                                                                                                     
						</div>                                                                                                                                                                        
					</div>                                                                                                                                                                          
				</div>                                                                                                                                                                            
			</div>                                                                                                                                                                              
		</div>                                                                                                                                                                                
   </#list>                                                                                                                            
                                                                                                                                                                               
                                                                                                                                                                                
	</div>                                                                                                                                                                                  
</body>                                                                                                                                                                                  
	<script>                                                                                                                                                                                
	${r'$'}(document).ready(function(){                                                                                                                                                           
		var result = "${r'$'}{param.result}";                                                                                                                                                     
		if(result=="null"){                                                                                                                                                                 
		    C.showMsg("无查询结果");                                                                                                                                                            
		}   
	});     
	
	//查询
	function query(formId){
		var $form = $("#"+formId);
		if(!C.toVail($form)){
			return ;
		}		
		toLoad($form.attr("action"),$form.serialize());
	}
	                                                                                                                                                                                
	</script>                                                                                                                                                                               
</html>		                                                                                                                                                                              

